export {}

// 定义抽象类，只能被继承
abstract class Animal {
  eat(food: string): void {
    console.log(`吃${food}吃的狼吞虎咽`)
  }
  abstract run(distance: number): void
}

class Dog extends Animal {
  run(distance: number): void {
    // throw new Error("Method not implemented.")
    console.log('完事儿了')
  }
}

const a = new Dog()
a.eat('hhh')
a.run(100)